1. Field of the Invention
This invention relates, in particular, to a motion vector detector suitable for use in a picture predictive coding device.
2. Description of the Related Art
A predictive coding system, such as MPEG (Moving Picture Coding Experts Group), is known, which encodes a picture by utilizing correlations with other frames. FIG. 1 shows one of devices for such predictive coding.
In FIG. 1, image data is supplied to an input terminal 101. The image data is supplied to a motion vector detecting circuit 102 and to a subtracter circuit 103. Then an interframe motion vector is obtained in the motion vector detecting circuit 102. The motion vector, obtained, is supplied to a motion compensation circuit 104.
On the other hand, image data of a reference frame is stored in a frame memory 105. Output from the frame memory 105 is supplied to the motion compensation circuit 104. The image data from the frame memory 105 is motion-compensated in the motion compensation circuit 104 on the basis of the motion vector obtained by the motion vector detecting circuit 102. The motion-compensated image data is supplied to the subtracter circuit 103 and to the adder circuit 106.
Image data of a current frame from the input terminal 101 and image data of the reference frame, which has been motion-compensated by the motion compensator circuit 104, are supplied to the subtracter circuit 103. The subtracter circuit 103 executes subtraction between the image data of the current frame and the image data of the reference frame to obtain a differential data of the successive frames. The differential data is supplied to a DCT circuit, and is DCT-converted there. Output from the DCT circuit 107 is supplied to a quantizer 108, and is quantized there. The quantizer 108 exerts its output through an output terminal 109.
The differential data, DCT-converted and quantized, is supplied to a inverse quantizer 110 and to a inverse DCT circuit 111, then converted back to the original differential data, and supplied to the adder 106. The adder 106 is supplied with the image data of the inverse frame from the motion compensation circuit 104. The adder 106 adds to the reference frame image data the differential data between the reference frame and the current frame to obtain an image data of the current frame. The image data of the current frame, thus obtained, is stored in the frame memory 105 for use as a next reference frame.
In this fashion, the interframe predictive coding process encodes a differential data between a current frame end a reference frame which has been motion-compensated on the basis of a motion vector. Block matching is known as a method for detecting such a motion vector to be used for interframe predictive coding process.
FIG. 2 illustrates the block matching method. In FIG. 2, 121 denotes a reference frame, and 122 is a search frame. A reference block 123 is defined in the reference frame 121, and a candidate block 124 is defined in the search frame 122. The candidate block 124 of the search frame 122 is moved over a predetermined search area to determine how much it coincides with the reference block 123 of the reference frame 121. Then a candidate block 124 representing a most coincidence with the reference block is employed as a matching block, and the motion vector is obtained from the matching block.
FIG. 3 shows a motion vector detector circuit conventionally available for detecting a motion vector by the block matching method. This circuit is designed to cope with detection of motion vectors at the rate of a half pixel.
In FIG. 3, numeral 151 designates a reference frame memory, and 152 designates a search frame memory. The reference frame memory 151 stores data of the reference block. Data of the reference block is read out from the reference frame memory 151 and supplied to an integral-pel matching operational circuit 153. The search frame memory 152 stores pixel data of the search frame, and a predetermined number of pixels (hereinafter referred to as the integer pixel rate) of a search area is supplied to the integer-pel matching operational circuit 153 to detect a motion vector.
Output from the integer-pel matching operational circuit 153 is supplied to buffer memory 154 and 155, and to an integrating circuit 156. The buffer memory 154 stores pixel data of the reference block. The buffer memory 155 stores pixel data of a search area surrounding the motion vector obtained at the integer pixel rate.
Outputs from the buffer memory 154 and 155 are supplied to a half-pel matching operational circuit 157 to detect a motion vector there at the half-pixel rate. The half-pel motion vector is supplied to the integrating circuit 156.
The integrating circuit 156 incorporates the integer-pel motion vector obtained by the integer-pel matching operational circuit 153 with the half-pel motion vector obtained by the half-pel matching operational circuit 157. The resulting motion vector is output from an output terminal 158.
Detection of the half-pel motion vector is performed by obtaining eight search blocks by interpolation, which are positionally different by a half pixel, then matching-processing the search block and the reference block, then comparing the eight matching errors with the matching error of the one-pixel position at the center, and choosing a point with a smallest error as an optimum motion vector.
That is, assume that 3.times.3 pixels define a block as shown in FIG. 4A. Then, as shown in FIG. 4B, search data necessary for interpolation is 5.times.5 pixels (s00 to s44). Made from the search data s00 to s44 are diagonally interpolative data d00 to d33, horizontally interpolative data h00 to h32 and vertically interpolative data v00 to v23. For a block of N.times.M, in general, data necessary for interpolation is (N+2).times.(M+2). Interpolation is done by operation as shown in FIG. 5. FIG. 6 shows the center of a block for half-pel vector detection. Circles are pixels. The center point (0, 0) of FIG. 6 represents a one-pixel motion vector MV (mx, my). Matching process is executed at surrounding eight points distant by a half pixel from the center point (0, 0). When the matching error at a point (x, y) in FIG. 6 is named dist(x, y), specific matching errors are as shown in FIG. 7. From these, a block with a smallest matching error is detected, and a final motion vector is obtained.
Japanese patent application numbers: 04-163,833 (File Date: 1992.05.29), 05-210,996 (File Date: 1993.08.03), 06-043,131 (File Date: 1994.02.17), 06-022,223 (File Date 1994.01.21) and U.S. Pat. No.: 5,173,771 were proposed as the related applications of the MPEG of this invention. Each of the above applications is owned by the assignee of the present invention and is hereby incorporated by reference. U.S. patent applications corresponding to the above four Japanese patent applications are pending.
As so far discussed, in case of obtaining a half-pel motion vector, data necessary for interpolation for a block with the dimension of N.times.M is (N+2).times.(M+2). Therefore, for a block with the dimension of (16.times.16), (18.times.18) pixels must be read out from the buffer memory 155. In contrast, a one-pixel motion vector is obtained with (16.times.16=256) clocks in the integer-pel matching operational circuit 153. Therefore, data must be read out from the buffer memory 155 with clocks of 1.27 times the clocks ((18.times.18)/(16.times.16)=324/256=1.27) for reading a picture. It is difficult to operate the buffer memory with clocks irrelevant to the data reading clocks.
It is therefore an object of the invention to provide a motion vector detecting device not requiring clocks irrelevant to data reading clocks.